package com.plian.system.entity.sys.warning;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@TableName("sys_warning_message")
@ApiModel(value = "预警消息表")
@Data
public class WarningMessage extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "预警配置Id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long warningConfigId;

    @ApiModelProperty(value = "业务模块 :code")
    private String businessModule;

    @ApiModelProperty(value = "业务单元:code")
    private String businessUnit;

    @ApiModelProperty(value = "预警单位")
    private String warningOrg;

    @ApiModelProperty(value = "所属集团")
    private String subordinateGroup;

    @ApiModelProperty(value = "预警事项")
    private String warningEvent;

    @ApiModelProperty(value = "预警指标")
    private String warningIndex;

    @ApiModelProperty(value = "预警内容")
    private String warningContent;

    @ApiModelProperty(value = "预警等级  1高 2中 3低")
    private Integer warningGrade;

    @ApiModelProperty(value = "预警亮灯类型 1红 2橙 3黄 4绿 5灰")
    private Integer warningLightType;

    @ApiModelProperty(value = "预警时间:yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    private Date warningDate;

    @ApiModelProperty(value = "来源 1监管平台 2大额资金系统 3工商登记信息")
    private Integer warningSource;

    @ApiModelProperty(value = "是否反馈:0-未反馈 1-已反馈 2-反馈驳回")
    private Integer feedbackStatus;

    @ApiModelProperty(value = "处理人员")
    private String disposeUser;

    @ApiModelProperty(value = "处理人职务")
    private String disposePosition;

    @ApiModelProperty(value = "处理结果")
    private String disposeResult;

    @ApiModelProperty(value = "处理日期:yyyy-MM-dd")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    private Date disposeDate;

    @ApiModelProperty(value = "处理说明")
    private String disposeContent;

    @ApiModelProperty(value = "附件")
    @TableField(exist = false)
    private List<HashMap> docList;

    @ApiModelProperty(value = "单据类型")
    private String formType;

    @ApiModelProperty(value = "审批人")
    private String approvedUser;

    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @ApiModelProperty(value = "审批时间")
    private Date approvedTime;

    @ApiModelProperty(value = "审批意见")
    private String approvedOpinion;

    @ApiModelProperty(value = "工商对比唯一key")
    private String warningKey;

    @ApiModelProperty(value = "所属行政单位id")
    private String competentOrganization;
}
